Replacing the call of a block
How to replace an existing →call for a →block in the →graphical FBD-editor when dragging the block from the project explorer:
Step |
Example: The used
|
|
---|---|---|
1 |
Expand the ST-object or the FBD-object in the project explorer. |
Expand the folders |
2 |
Point to the corresponding sub-level item. |
Point to the sub-level item |
3 |
Press and hold the primary mouse button while you are dragging the block into the opened FBD-editor. |
|
4 |
Position the call over a call that is already set in the drawing field. |
Position the
|
5 |
Replace the existing call by releasing the primary mouse button. Press the ESC-key, if you do not want to position the element and abort the action. |
Now the
|
The replacing of a block is possible analogously, if the new call has been created by using the content assist.
If you want to replace the call by a new call of the same block, best practice is to update the existing call (see "Updating existing calls for changed interfaces").
Behavior when replacing: Instance name is not used.
The instance name of the new function block is replaced instead of the instance name of the original block. However, the display settings of the original block is used. That means, if the instance name has been shown for the original block, the instance name will be displayed for the new function block as well.
Mind the following special cases:
-
If a variable of the original block is accessed in the drawing field, this access is not automatically updated to the name of the new block (see example 1). Subsequently, the access is highlighted as faulty.
-
If a function block is replaced by a function, no instance name will be displayed for the function. Reason: Functions do not have an instance name (see example 2).
Example 1 |
Example 2 |
|
---|---|---|
Original block |
|
|
is replaced |
|
|
with this new block. |
|
|
Behavior when replacing: Properties are used.
Here an explanation using examples which properties of the replaced call (= original block) are usually used for the new call (= new block).
Different size of blocks
The size of the original block is used for the new block (see example 1). Exception: The new block is automatically enlarged so that all necessary in-/outputs are visible (see example 2).
Example 1 |
Example 2 |
|
---|---|---|
Original block |
|
|
is replaced |
|
|
with this new block. |
|
|
Connected lines
Linies are reattached to the new block. Mind the following results:
-
If type conflicts arise, they are highlighted by the faulty lines (see example 1).
-
If there is no in-/output at the new block where a line was connected to an in-/output of the original block, the line is deleted (see example 2).
Example 1 |
Example 2 |
|
---|---|---|
Original block |
|
|
is replaced |
|
|
with this new block. |
|
|
Other properties
Moreover, the new blocks uses all other settings that have been made for the original block in the drawing field.
Examples for such used settings:
-
negation of in-/outputs
-
display settings of not connected in-/outputs